package top.yunjianwang;

import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
import top.yunjianwang.event.MyEventHandler;

import java.util.logging.Logger;

public final class Whitelist extends JavaPlugin {
    private final Logger logger = this.getLogger();
    PluginManager pluginManager = Bukkit.getPluginManager();
    FileConfiguration config = this.getConfig();

    @Override
    public void onEnable() {


        logger.info("Enable the Spigot:WhiteListPlugin.");
        pluginManager.registerEvents(new MyEventHandler(this), this);

    }

    @Override
    public void onLoad() {
        logger.info("Loading the Spigot:WhiteListPlugin.");
    }

    @Override
    public void onDisable() {
        logger.info("Disable the Spigot:WhiteListPlugin.");
        this.saveConfig();
    }
}
